<?php
class C_Message extends C_Abstract
{
    protected $table = 't_message';
    
    public function saveAction()
    {
        require_once APP_HOME .'/input/message.php';
        $input = new Input_Message(getPost());
        if ($input->isValid()) {
            $this->db->save($this->table, $input->getData(), array('name=?'=>$input->getData('name'), 'phone=?'=>$input->getData('phone')));
        } else {
            //alert($input->getMessage());
            echo $input->getMessage();
        }
        echo 'success';
    }
}